import 'package:cbec_app/generated/json/base/json_convert_content.dart';
import 'package:cbec_app/pages/goods/entity/new_product_nav_entity.dart';

NewProductNavEntity $NewProductNavEntityFromJson(Map<String, dynamic> json) {
  final NewProductNavEntity newProductNavEntity = NewProductNavEntity();
  final String? label = jsonConvert.convert<String>(json['label']);
  if (label != null) {
    newProductNavEntity.label = label;
  }
  final int? value = jsonConvert.convert<int>(json['value']);
  if (value != null) {
    newProductNavEntity.value = value;
  }
  return newProductNavEntity;
}

Map<String, dynamic> $NewProductNavEntityToJson(NewProductNavEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['label'] = entity.label;
  data['value'] = entity.value;
  return data;
}

extension NewProductNavEntityExtension on NewProductNavEntity {
  NewProductNavEntity copyWith({
    String? label,
    int? value,
  }) {
    return NewProductNavEntity()
      ..label = label ?? this.label
      ..value = value ?? this.value;
  }
}
